package com.zyylr.classroomreservationsystem.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zyylr.classroomreservationsystem.consts.GlobalConsts;

import java.io.Serializable;
import java.util.Date;

@JsonFormat(pattern = GlobalConsts.DATE_FORMAT_PATTERN)
public class Reservation implements Serializable {
    private Integer id;
    private User user;
    private Classroom classroom;
    private Date time;
    private Date start_time;
    private Date end_time;
    private Integer status;

    public Reservation() {
    }

    public Reservation(User user, Classroom classroom, Date time, Date start_time, Date end_time) {
        this.user = user;
        this.classroom = classroom;
        this.time = time;
        this.start_time = start_time;
        this.end_time = end_time;
    }

    public Reservation(Integer id, User user, Classroom classroom, Date time, Date startTime, Date endTime, Integer status) {
        this.id = id;
        this.user = user;
        this.classroom = classroom;
        this.time = time;
        this.start_time = startTime;
        this.end_time = endTime;
        this.status = status;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Classroom getClassroom() {
        return classroom;
    }

    public void setClassroom(Classroom classroom) {
        this.classroom = classroom;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Date getStart_time() {
        return start_time;
    }

    public void setStart_time(Date start_time) {
        this.start_time = start_time;
    }

    public Date getEnd_time() {
        return end_time;
    }

    public void setEnd_time(Date end_time) {
        this.end_time = end_time;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Reservation{" +
                "id=" + id +
                ", user=" + user +
                ", classroom=" + classroom +
                ", time=" + time +
                ", start_time=" + start_time +
                ", end_time=" + end_time +
                ", status=" + status +
                '}';
    }
}
